import React from 'react';
import { Menu, Icon } from 'antd';

const SubMenu = Menu.SubMenu;
const MenuItemGroup = Menu.ItemGroup;

class TopNavigtion extends React.Component {
    state = {
        current: 'file'
    };
    constructor(props) {
        super(props);
    }

    render() {
        return (
            <Menu
                mode="horizontal" 
                selectedKeys={[this.state.current]}
                theme="dark"
            >
                <Menu.SubMenu key="file" title={<span><Icon type="file" />文件</span>}>
                    <Menu.Item key="file_new">新建</Menu.Item>
                    <Menu.Item key="file_open">打开</Menu.Item>
                </Menu.SubMenu>

                <Menu.SubMenu key="tool" title={<span><Icon type="tool" />工具</span>}>
                    <Menu.Item key="tool_one">工具一</Menu.Item>
                </Menu.SubMenu>
            </Menu>
        );
    }
}

export {TopNavigtion};